Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NPE in Storage with Mass Ingestion and Compartment Interceptor #6598

Open
wants to merge 5 commits into
base: rel_8_0
Choose a base branch
from

Conversation

jdar8
Copy link
Collaborator

@jdar8 jdar8 commented Jan 7, 2025

What was done:
Fixed a couple bugs relating how different settings interact with the Patient Compartment Enforcing Interceptor:

  • ResourceCompartmentUtil#getPatientCompartmentIdentity() (used by the interceptor) would throw a NPE when the provided resource is null. Fixed by adding a null check.
  • When both mass ingestion and the Patient Compartment Enforcing Interceptor is enabled, the interceptor needs to know the resource in order to compute the compartment for comparison. However, mass ingestion will set the resource to null. Fixed by ensuring resource is not set to null if the interceptor is present.
  • Added tests and changelog

Closes #6599

Copy link

github-actions bot commented Jan 7, 2025

Formatting check succeeded!

Copy link

codecov bot commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (rel_8_0@7090c3f). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             rel_8_0    #6598   +/-   ##
==========================================
  Coverage           ?   83.52%           
  Complexity         ?    28591           
==========================================
  Files              ?     1798           
  Lines              ?   111245           
  Branches           ?    13969           
==========================================
  Hits               ?    92912           
  Misses             ?    12343           
  Partials           ?     5990           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@TipzCM TipzCM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor changes

false);
}

protected DaoMethodOutcome doUpdateForUpdateOrPatch(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This multiple method thing is exactly why i think we should make a new parameters object and have that API be the 'main' one.

Multiple overrides and multiple methods will lead to funny bugs if people make methods with different 'combinations' of parameters.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactored out a parameters object. Thanks for the review!

@jdar8 jdar8 changed the base branch from master to rel_8_0 January 24, 2025 22:38
…E-mass-ingestion-with-patient-compartment-interceptor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NPE when Restarting Storage Module
2 participants